//package com.kws.payment.controller;
//
//import cn.hutool.json.JSONUtil;
//import com.kws.common.core.domain.R;
//import com.kws.payment.dao.RefundUnionPayRq;
//import com.kws.payment.dao.UnionPayRq;
//import com.kws.payment.dao.UnionWebPayNotificationRq;
//import com.kws.payment.service.UnionWebPayService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
///**
// * <b>UnionWebPayController</b>
// *
// * @description: UnionWebPayController <br>
// * @date: 2024/12/4 14:53 <br>
// * @author: lhm <br>
// * @version: 1.0 <br>
// */
//
//@Api(tags = "银联web支付")
//@RestController
//public class UnionWebPayController {
//    private static final Logger logger = LoggerFactory.getLogger(UnionWebPayController.class);
//
//    @Autowired
//    private UnionWebPayService unionWebPayService;
//
//    @ApiOperation("获取支付二维码")
//    @PostMapping("/query/payUrl")
//    public R queryPayUrl(@RequestBody UnionPayRq rq) throws Exception {
//        String url = unionWebPayService.queryPayUrl(rq);
//        return R.ok(url);
//    }
//
//    @ApiOperation("关闭二维码")
//    @GetMapping("/cancel/pay")
//    public R cancelPay(@RequestParam String qrCodeId) throws Exception {
//        return unionWebPayService.cancelPay(qrCodeId);
//    }
//
//    @ApiOperation("退款")
//    @PostMapping("/refund/unionWebPay")
//    public R refundUnionWebPay(@RequestBody RefundUnionPayRq rq) throws Exception {
//        return unionWebPayService.refundUnionWebPay(rq);
//    }
//
//    @ApiOperation("支付结果通知回调")
//    @PostMapping("/payResult/notifyUrl")
//    public void payResultNotifyUrl(@RequestBody UnionWebPayNotificationRq rq){
//        logger.info("获取支付回调结果:{}"+ JSONUtil.parse(rq));
//    }
//}
